package utils;

import android.content.Context;
import android.graphics.Point;
import android.view.Display;
import android.view.WindowManager;

public class MultiScreenHelper {
	private Context context;
	private int scrWidth;
	private int scrHeight;

	private static MultiScreenHelper instance;

	private MultiScreenHelper(Context ctx) {
		context = ctx;

		WindowManager wm = (WindowManager) context
				.getSystemService(Context.WINDOW_SERVICE);
		Display display = wm.getDefaultDisplay();
		scrWidth = display.getWidth();
		scrHeight = display.getHeight();
	}

	public static synchronized MultiScreenHelper getInstance(Context ctx) {
		if (instance == null)
			instance = new MultiScreenHelper(ctx);
		return instance;
	}

	@Override
	protected Object clone() throws CloneNotSupportedException {
		throw new CloneNotSupportedException("Clone is not allowed.");
	}

	public int getScrWidth() {
		return scrWidth;
	}

	public void setScrWidth(int scrWidth) {
		this.scrWidth = scrWidth;
	}

	public int getScrHeight() {
		return scrHeight;
	}

	public void setScrHeight(int scrHeight) {
		this.scrHeight = scrHeight;
	}

}
